package com.ourteam.config;

import org.springframework.core.convert.converter.Converter;
import org.springframework.util.StringUtils;

public class StringToLongConverter implements Converter<String, Long> {
	
	@Override
	public Long convert(String value) {

		if (StringUtils.isEmpty(value)) {
			return Long.valueOf(0);
		}

		value = value.trim();

		return Long.parseLong(value);
	}

}
